using System;
using System.ComponentModel.DataAnnotations;
using EIMS.Models.Enums;

namespace EIMS.Models.ViewModels
{
    /// <summary>
    /// 员工历史记录视图模型
    /// </summary>
    public class EmployeeHistoryViewModel
    {
        public int EmployeeId { get; set; }
        
        [Display(Name = "员工姓名")]
        [Required(ErrorMessage = "员工姓名不能为空")]
        public string EmployeeName { get; set; } = string.Empty;
        
        [Display(Name = "记录类型")]
        [Required(ErrorMessage = "请选择记录类型")]
        public HistoryType Type { get; set; }
        
        [Display(Name = "生效日期")]
        [Required(ErrorMessage = "请选择生效日期")]
        [DataType(DataType.Date)]
        public DateTime EffectiveDate { get; set; } = DateTime.Now;
        
        [Display(Name = "当前部门")]
        public int? CurrentDepartmentId { get; set; }
        
        [Display(Name = "当前部门")]
        [Required(ErrorMessage = "当前部门不能为空")]
        public string CurrentDepartmentName { get; set; } = string.Empty;
        
        [Display(Name = "原部门")]
        public int? OldDepartmentId { get; set; }
        
        [Display(Name = "新部门")]
        public int? NewDepartmentId { get; set; }
        
        [Display(Name = "备注")]
        [MaxLength(500, ErrorMessage = "备注不能超过500个字符")]
        public string? Remarks { get; set; }
    }
} 